/**
 * Yolema.com Inc.
 * Copyright (c) 2011-2012 All Rights Reserved.
 */
package org.grayrabbit.pay.core.biz.manager.system;

import java.util.List;
import java.util.Map;

import org.grayrabbit.pay.core.model.entity.system.TradeTerminal;
import org.grayrabbit.pay.core.model.pages.PageList;
import org.grayrabbit.pay.core.model.results.GenericsResult;
import org.grayrabbit.pay.core.model.results.PayResult;

/**
 * 
 * 
 * @author liyd
 * @version $Id: TradeTerminalManager.java, v 0.1 Sat Jun 02 22:00:25 CST 2012 liyd Exp $
 */
public interface TradeTerminalManager {

    /**
     * 查询业务列表
     * 
     * @param tradeTerminal
     * @return
     */
    public GenericsResult<PageList<TradeTerminal>> queryPageList(TradeTerminal tradeTerminal);

    /**
     * 根据Id得到实体对象
     * 
     * @param id
     * @return
     */
    public GenericsResult<TradeTerminal> getById(Long id);

    /**
     * 根据id批量删除
     * 
     * @param idArray
     * @return
     */
    public PayResult deleteBatchById(Long[] idArray);

    /**
     * 查询所有对象
     * 
     * @return
     */
    public GenericsResult<List<TradeTerminal>> findAll();

    /**
     * 查询所有对象
     * 
     * @return
     */
    public GenericsResult<Map<String, TradeTerminal>> findAllMap();

    /**
     * 查询所有对象
     * 
     * @return
     */
    public GenericsResult<Map<Long, TradeTerminal>> findIdMap();

    /**
     * 更改终端的可用状态
     * @param tradeTerminal
     * @return
     */
    public GenericsResult<Integer> saveStatus(TradeTerminal tradeTerminal);

    /**
     * 添加一个对象
     * 
     * @param tradeTerminal
     * @return
     */
    public GenericsResult<TradeTerminal> insert(TradeTerminal tradeTerminal);

    /**
     * 更新一个对象
     * 
     * @param tradeTerminal
     * @return
     */
    public GenericsResult<Integer> update(TradeTerminal tradeTerminal);

    /**
     * 判断该code是否已存在
     * 
     * @param tradeTerminal
     * @return
     */
    public PayResult getIfRepeatByCode(TradeTerminal tradeTerminal);

    /**
     * 删除一个对象
     * 
     * @param tradeTerminal
     * @return
     */
    public PayResult delete(TradeTerminal tradeTerminal);

}
